//
//  OrderDetailsTableViewCell.m
//  waiMai
//
//  Created by LONG on 16/4/19.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "OrderDetailsTableViewCell.h"

@implementation OrderDetailsTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self viewCreate];
    }
    return self;
}

-(void)viewCreate{
    //view1
    _xian = [[UIView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 1)];
    _xian.backgroundColor = UIColorFromRGB(0xefeff1);
    
    _image = [[UIImageView alloc]initWithFrame:CGRectMake(10, 20, 30, 30)];
    _image.layer.masksToBounds = YES; //没这句话它圆不起来
    _image.layer.cornerRadius = 15.5;
    _image.image = [UIImage imageNamed:@"1"];
    
    _title = [[UILabel alloc]initWithFrame:CGRectMake(50, 15, 200, 20)];
    _title.font = [UIFont systemFontOfSize:14];
    _title.textColor = [UIColor blackColor];
    
    _viewlab = [[UILabel alloc]initWithFrame:CGRectMake(50, 40, 200, 20)];
    _viewlab.font = [UIFont systemFontOfSize:12];
    _viewlab.textColor = UIColorFromRGB(0x666666);
    
    _timelab = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH-100, 10, 85, 20)];
    _timelab.font = [UIFont systemFontOfSize:12];
    _timelab.textAlignment = 2;
    _timelab.textColor = UIColorFromRGB(0x666666);
    
    _gengduo = [[UIButton alloc]initWithFrame:CGRectMake(WIDTH-100, 35, 85, 30)];
    [_gengduo setTitle:@"更多状态>" forState:UIControlStateNormal];
    _gengduo.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
    [_gengduo setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    _gengduo.titleLabel.font = [UIFont systemFontOfSize:13];
    
    //view2
    
    
    _name = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 200, 20)];
    _name.font = [UIFont systemFontOfSize:12];
    _name.textColor = UIColorFromRGB(0x333333);
    
    _price = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH-50, 10, 40, 20)];
    _price.font = [UIFont systemFontOfSize:12];
    _price.textAlignment = 2;
    _price.textColor = UIColorFromRGB(0x666666);
    
    _numer = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH-150, 10, 40, 20)];
    _numer.font = [UIFont systemFontOfSize:12];
    _numer.textAlignment = 2;
    _numer.textColor = UIColorFromRGB(0x666666);
    
    _zailaiyidan = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, WIDTH, 40)];
    [_zailaiyidan setTitle:@"再来一单" forState:UIControlStateNormal];
    [_zailaiyidan setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    _zailaiyidan.titleLabel.font = [UIFont systemFontOfSize:15];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
